import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;

public class E1 {

  public static void searchFileSystem(File file, 
      PrintWriter writer, String search) {
    if (file.isDirectory()) {
      File[] list = file.listFiles();
      for (File f : list) {
        searchFileSystem(f, writer, search);
      }
    } else {
      if (searchFile(file, search)) {
        writer.println(file.getPath());
      }
    }
  }

  public static boolean searchFile(File file, String search) {
    return false;
  }
  
  public static void main(String[] args) throws IOException {
    String search = "serach for something";
    FileOutputStream out = new FileOutputStream("result.txt");
    PrintWriter writer = new PrintWriter(out);
    searchFileSystem(new File("xxx\\"), writer, search);
  }
}
